package cn.bdqn.witcity.mapper;

import cn.bdqn.witcity.entity.Role;
import cn.bdqn.witcity.entity.User;
import cn.bdqn.witcity.entity.vo.UserVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserMapper {
    User loadUserByUsername(String username);
    List<Role> getUserRolesByUid(Integer uid);
    List<User> getUserByPage(UserVo userVo);
    int getUserCount(UserVo userVo);
    int addUser(User user);
    int addUserRole(@Param("uid") Integer uid, @Param("rid") Integer rid);
    int updateUser(User user);
    int delUser(@Param("id") Integer id);
    int delRoleUser(@Param("id")Integer id);
    List<User> findBangKe();
    int updateMoney(User user);
    User findById(Integer id);
}
